Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 180: Fix not parsing pip.conf index urls #181

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

calizarr
Copy link

@calizarr calizarr commented Aug 2, 2024

Fixes: #180

pip prefers the usage of the CLI tool to get information, therefore I resorted to subprocess for this. This should get the information from the pip CLI tool and then add it into the index_urls tuple.

Thanks.

@calizarr calizarr force-pushed the fix-180-pip-conf-parsing branch 2 times, most recently from b1f7f47 to 088c157 Compare August 2, 2024 22:09
@calizarr
Copy link
Author

calizarr commented Aug 2, 2024

I cannot get a good grasp on why the tests are failing. The diffs are a bit too long and the only change should be in the index_urls. If empty, then it should be equivalent to the same as before. If not, then yes things would change, but searching for the specific part in the diff is almost impossible.

@calizarr
Copy link
Author

calizarr commented Aug 5, 2024

After running:

./configure --clean
./configure --dev
PYINSP_REGEN_TEST_FIXTURES=yes ./venv/bin/python -m pytest -vvs --color=yes

Then there are some pycodestyle failures in my recently added code, however, there are still other failures that have to do with package versions not being exact. I can change those etc. although it's certainly not what this PR is meant to do.

@sschuberth
Copy link
Contributor

Note that @heliocastro already filed #170, which seems to be related.

@calizarr
Copy link
Author

calizarr commented Aug 8, 2024

Note that @heliocastro already filed #170, which seems to be related.

They are incredibly related if not almost identical. However, pip warns against using it as a library

As noted previously, pip is a command line program. While it is implemented in Python, and so is available from your Python code via import pip, you must not use pip’s internal APIs in this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pip.conf settings are not parsed or respected
2 participants